import Vue from 'vue'
import App from './App'
import store from './store' // store
import plugins from './plugins' // plugins
import './permission' // permission
import { getTopIconDistance } from './utils/methods'
import uView from '@/uni_modules/uview-ui'
import pageConfig from '@/config'
import * as utils from './utils/index'
import TabBar from '@/components/tab-bar/index.vue'
import NavBar from '@/components/nav-bar/index.vue'
import YouScroll from '@/components/you-scroll/index.vue'
import YouPopup from '@/components/you-popup/index.vue'
import YouForm from '@/components/you-form/index.vue'
import YouDetail from '@/components/you-detail/index.vue'
import YouBottomBtn from '@/components/you-bottom-btn/index.vue'
import YouSearch from '@/components/you-search/index.vue'
import YouTabs from '@/components/you-tabs/index.vue'
import shareWx from './utils/shareWx'

Vue.mixin(shareWx)
Vue.use(uView)

Vue.use(plugins)
Vue.component('TabBar', TabBar)
Vue.component('NavBar', NavBar)
Vue.component('YouScroll', YouScroll)
Vue.component('YouPopup', YouPopup)
Vue.component('YouForm', YouForm)
Vue.component('YouDetail', YouDetail)
Vue.component('YouBottomBtn', YouBottomBtn)
Vue.component('YouSearch', YouSearch)
Vue.component('YouTabs', YouTabs)
getTopIconDistance()

Vue.config.productionTip = false
Vue.prototype.$store = store
Vue.prototype.$utils = utils
Vue.prototype.$pageConfig = pageConfig

App.mpType = 'app'

const app = new Vue({
  ...App
})

app.$mount()
